package com.yanqu.road.entity.beautyescort;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;

/**
 * 押镖车
 */
@FieldTypeAnnotation(tableName = "t_c_escort_cart")
public class EscortCartData extends DataObject {

    @FieldTypeAnnotation(select = true, update = true, desc = "玩家id")
    private long userId;

    @FieldTypeAnnotation(update = true, desc = "镖车id")
    private int cartId;

    @FieldTypeAnnotation(update = true, desc = "区服id")
    private long serverId;

    @FieldTypeAnnotation(desc = "押镖id,按玩家递增")
    private long dartId;

    @FieldTypeAnnotation(desc = "委托人")
    private int clientId;

    @FieldTypeAnnotation(desc = "走镖类型")
    private int dartTypeId;

    @FieldTypeAnnotation(desc = "走镖时间-秒")
    private int startTime;

    @FieldTypeAnnotation(desc = "减少耗时-分钟")
    private int reduceTime;

    @FieldTypeAnnotation(desc = "耗时-分钟")
    private int takeTime;

    @FieldTypeAnnotation(desc = "被劫次数")
    private int robbedTimes;

    @FieldTypeAnnotation(desc = "自动处理事件")
    private boolean autoHandleEvent;

    @FieldTypeAnnotation(desc = "派遣美女")
    private List<EscortBeautyDispatch> beautyDispatchList = new ArrayList<>();

    @FieldTypeAnnotation(desc = "状态")
    private int state;

    @FieldTypeAnnotation(desc = "是否领奖")
    private boolean getReward;

    @FieldTypeAnnotation(desc = "是否领奖(事件)")
    private boolean getEventReward;

    @FieldTypeAnnotation(desc = "事件")
    private EscortBeautyEvent event = new EscortBeautyEvent();

    @FieldTypeAnnotation(desc = "劫持者")
    private List<Long> enemy = new ArrayList<>();

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getCartId() {
        return cartId;
    }

    public void setCartId(int cartId) {
        if(this.cartId != cartId) {
            this.cartId = cartId;
            setUpdateOption();
        }
    }

    public long getServerId() {
        return serverId;
    }

    public void setServerId(long serverId) {
        if(this.serverId != serverId) {
            this.serverId = serverId;
            setUpdateOption();
        }
    }

    public long getDartId() {
        return dartId;
    }

    public void setDartId(long dartId) {
        if(this.dartId != dartId) {
            this.dartId = dartId;
            setUpdateOption();
        }
    }

    public int getClientId() {
        return clientId;
    }

    public void setClientId(int clientId) {
        if(this.clientId != clientId) {
            this.clientId = clientId;
            setUpdateOption();
        }
    }

    public int getDartTypeId() {
        return dartTypeId;
    }

    public void setDartTypeId(int dartTypeId) {
        if(this.dartTypeId != dartTypeId) {
            this.dartTypeId = dartTypeId;
            setUpdateOption();
        }
    }

    public int getStartTime() {
        return startTime;
    }

    public void setStartTime(int startTime) {
        if(this.startTime != startTime) {
            this.startTime = startTime;
            setUpdateOption();
        }
    }

    public int getReduceTime() {
        return reduceTime;
    }

    public void setReduceTime(int reduceTime) {
        if(this.reduceTime != reduceTime) {
            this.reduceTime = reduceTime;
            setUpdateOption();
        }
    }

    public int getTakeTime() {
        return takeTime;
    }

    public void setTakeTime(int takeTime) {
        if(this.takeTime != takeTime) {
            this.takeTime = takeTime;
            setUpdateOption();
        }
    }

    public int getRobbedTimes() {
        return robbedTimes;
    }

    public void setRobbedTimes(int robbedTimes) {
        if(this.robbedTimes != robbedTimes) {
            this.robbedTimes = robbedTimes;
            setUpdateOption();
        }
    }

    public boolean isAutoHandleEvent() {
        return autoHandleEvent;
    }

    public void setAutoHandleEvent(boolean autoHandleEvent) {
        if(this.autoHandleEvent != autoHandleEvent) {
            this.autoHandleEvent = autoHandleEvent;
            setUpdateOption();
        }
    }

    public List<EscortBeautyDispatch> getBeautyDispatchList() {
        return beautyDispatchList;
    }

    public void setBeautyDispatchList(List<EscortBeautyDispatch> beautyDispatchList) {
        if(this.beautyDispatchList != beautyDispatchList) {
            this.beautyDispatchList = beautyDispatchList;
            setUpdateOption();
        }
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        if(this.state != state) {
            this.state = state;
            setUpdateOption();
        }
    }

    public boolean isGetReward() {
        return getReward;
    }

    public void setGetReward(boolean getReward) {
        if(this.getReward != getReward) {
            this.getReward = getReward;
            setUpdateOption();
        }
    }

    public EscortBeautyEvent getEvent() {
        return event;
    }

    public void setEvent(EscortBeautyEvent event) {
        if(this.event != event) {
            this.event = event;
            setUpdateOption();
        }
    }

    public boolean isGetEventReward() {
        return getEventReward;
    }

    public void setGetEventReward(boolean getEventReward) {
        if(this.getEventReward != getEventReward) {
            this.getEventReward = getEventReward;
            setUpdateOption();
        }
    }

    public List<Long> getEnemy() {
        return enemy;
    }

    public void setEnemy(List<Long> enemy) {
        if(this.enemy != enemy) {
            this.enemy = enemy;
            setUpdateOption();
        }
    }

    public void addEnemy(long userId){
        if(!this.enemy.contains(userId)){
            this.enemy.add(userId);
            setUpdateOption();
        }
    }
}
